NVIDIA Tegra
NVIDIA Tegra Linux Driver Package

Development Guide
28.2 Release


 
TegraStats Utility
 
Reported Statistics
Options
Running TegraStats
Re-Deploying TegraStats
The TegraStats utility reports memory and processor usage for NVIDIA® Tegra® devices.
The JetPack installer, or the flashing script, places the script in the home directory on the target at:
${HOME}/tegrastats
On the host system, the script is delivered in the TAR file at:
Linux_for_Tegra/nv_tegra/nv_tools.tbz2
Reported Statistics
The statistics the TegraStats utility reports are as follows:
Statistic
X
Y
Z
RAM X/Y (lfb NxZ)
• Largest Free Block (lfb) is a statistic about the memory allocator.
• Refers to the largest contiguous block of physical memory that can currently be allocated; at most 4 MB. Can become smaller with memory fragmentation.
• The physical allocations in virtual memory can be bigger.
Amount of RAM in use in MB.
Total amount of RAM available for applications.
Z is the size of the largest free block.
N the number of free blocks of this size.
CPU [X%,Y%, , ]@Z
• T30 has up to four CPU cores in the G-Cluster.
• One CPU core in the LP-Cluster.
Load statistics for each of the CPU cores relative to the current running frequency Z, or 'off' in case a core is currently powered down.
A rough approximation based on time spent in system idle process as reported by the Linux kernel in /proc/stat file.
Load statistics for each of the CPU cores relative to the current running frequency Z, or 'off' in case a core is currently powered down.
A rough approximation based on time spent in system idle process as reported by the Linux kernel in /proc/stat file.
CPU frequency in MHz. Dynamically goes up or down depending on the CPU workload.
APE Audio Processing Engine Y
APE subsystem consists of ADSP (Cortex®-A9 CPU), mailboxes, AHUB, ADMA etc.
N/A
ADSP load activity monitor and reports ADSP frequency in MHz
N/A
edp limit X
TX1: To see EDP limit use
--systrace
Limit of the CPU maximum frequency.
N/A
N/A
emc X%@Y
EMC is the external memory controller, through which all sysmem/carve-out/GART memory accesses go.
Percent of the EMC memory bandwidth being used; relative to the current running frequency.
EMC frequency in MHz
N/A
GR3D X%@Y
GR3D is the GPU engine.
Percent of the GR3D being used; relative to the current running frequency.
GR3D frequency in MHz
N/A
MSENC Y
MSENC is the video hardware encoding engine.
N/A
MSENC frequency in MHz
N/A
NVDEC Y
NVDEC is the video hardware decoding engine.
Shown only when hardware decoder/encoder engine is used.
N/A
NVDEC frequency in MHz
N/A
Example Output
The following example is extracted from a 1080p video playback usecase. The CPU frequency is running between 300 and 750 MHz with one active CPU.
RAM 1242/7851MB (lfb 1117x4MB) cpu [0%@1881,off,off,0%@1882,0%@1881,0%@1881] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 35%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [19%@345,off,off,14%@345,11%@345,24%@345] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 39%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [23%@2035,off,off,20%@2034,20%@2035,38%@2036] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 28%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [11%@345,off,off,18%@345,13%@345,30%@345] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 37%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [18%@345,off,off,16%@345,19%@345,18%@345] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 35%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [17%@345,off,off,12%@345,13%@345,25%@345] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 46%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [17%@345,off,off,12%@345,17%@345,20%@345] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 53%@114
 
APE Example output:
nvidia@tegra-ubuntu:~$ sudo ./tegrastats
RAM 1242/7851MB (lfb 1117x4MB) cpu [0%@1881,off,off,0%@1882,0%@1881,0%@1881] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 35%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [19%@345,off,off,14%@345,11%@345,24%@345] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 39%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [23%@2035,off,off,20%@2034,20%@2035,38%@2036] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 28%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [11%@345,off,off,18%@345,13%@345,30%@345] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 37%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [18%@345,off,off,16%@345,19%@345,18%@345] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 35%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [17%@345,off,off,12%@345,13%@345,25%@345] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 46%@114
RAM 1243/7851MB (lfb 1117x4MB) cpu [17%@345,off,off,12%@345,17%@345,20%@345] EMC 10%@1600 APE 150 NVDEC 1203 GR3D 53%@114
 
EDP limit with --systrace output:
root@tegra-ubuntu:~# ./tegrastats --systrace
argv[1] = --systrace
 
RAM 1496/3983MB (lfb 427x4MB) cpu [0%,0%,0%,0%]@102 EMC 22%@68 APE 25 GR3D 0%@76 EDP limit 1734
RAM 1496/3983MB (lfb 427x4MB) cpu [32%,0%,0%,0%]@204 EMC 22%@68 APE 25 GR3D 0%@76 EDP limit 1734
RAM 1496/3983MB (lfb 427x4MB) cpu [5%,31%,0%,0%]@204 EMC 24%@68 APE 25 GR3D 0%@76 EDP limit 1734
 
Options
TegraStats options and usage are described in the following table.
Option
Description
<delay>
The delay between outputs in milliseconds (ms). For example, a value of 500 causes output to display twice per second. If no delay value is specified, the default delay is 1000 ms. A <delay> value, if specified, must be the first value after the command, before any other options.
--start
Run TegraStats as a daemon, in the background.
--stop
Stop running any running instances of tegrastats.
--logfile <out_file>
Write the output of TegraStats to <out_file>.
-once
Print data only once and then exit.
-throttle
Track the throttle count.
<thermal_zone>
Print temperature in specified <thermal_zone>. The value for <thermal_zone> must match one of the strings in "/sys/devices/virtual/thermal/thermal_zone*/type.
Running TegraStats
When running tegrastats on Linux devices, it prints statistics to stdout.
Example Log Print
RAM 1687/3983MB (lfb 43x4MB) cpu [1%,3%,6%,0%]@102 EMC 21%@68 APE 25 GR3D 9%@76
To run tegrastats
• On the target, execute the following command:
sudo ${HOME}/tegrastats <delay> &
Where <delay> is the frequency of log prints, expressed in milliseconds (1000 means print every second).
To stop tegrastats
• On the target, execute the following command:
sudo ${HOME}/tegrastats --stop
Re-Deploying TegraStats
The TegraStats utility is preinstalled in the default root file system in the home directory. If you modified the root file system configuration and removed tegrastats from the build, you can re-deploy it on the target at runtime.
To re-deploy tegrastats
• Execute the following command from the debug host system:
scp tegrastats nvidia@<TARGET_DEVICE_IP>:/home/nvidia/